package com.yuqing.sentimentapp.module;

import android.content.Context;

import com.linkface.baselibrary.http.BaseBean;
import com.linkface.baselibrary.http.RetrofitClient;
import com.yuqing.sentimentapp.QYApplication;
import com.yuqing.sentimentapp.api.ApiService;
import com.yuqing.sentimentapp.home.bean.EarlyWarningDataBean;
import com.yuqing.sentimentapp.home.bean.HotChannelBean;
import com.yuqing.sentimentapp.home.bean.IssuedPrepareDataBean;
import com.yuqing.sentimentapp.home.bean.IssuedSaveRegionDataBean;
import com.yuqing.sentimentapp.home.bean.NewsDataBean;
import com.yuqing.sentimentapp.home.bean.NewsDetailDataBean;
import com.yuqing.sentimentapp.home.bean.RecommendDataBean;
import com.yuqing.sentimentapp.home.bean.ReplyDataBean;
import com.yuqing.sentimentapp.home.bean.SpecialTopicDetailDataBean;
import com.yuqing.sentimentapp.login.bean.LoginResultBean;
import com.yuqing.sentimentapp.mine.bean.MinePersonInfoBean;
import com.yuqing.sentimentapp.utils.Md5Util;
import com.yuqing.sentimentapp.utils.SharePrefrenceHelper;
import com.yuqing.sentimentapp.workspace.action.entity.ActionInfoResult;
import com.yuqing.sentimentapp.workspace.action.entity.ActionReportResult;
import com.yuqing.sentimentapp.workspace.duty.entity.DutyInfoResult;
import com.yuqing.sentimentapp.workspace.duty.entity.DutyReportResult;
import com.yuqing.sentimentapp.workspace.duty.entity.ReportUnitInfoResult;
import com.yuqing.sentimentapp.workspace.epidemic.action.entity.EpidemicActionInfoResult;
import com.yuqing.sentimentapp.workspace.epidemic.action.entity.EpidemicActionReportResult;
import com.yuqing.sentimentapp.workspace.epidemic.material.entity.EpidemicMaterialInfoResult;
import com.yuqing.sentimentapp.workspace.epidemic.material.entity.EpidemicMaterialReportResult;
import com.yuqing.sentimentapp.workspace.epidemic.personal.entity.EpidemicPersonalInfoResult;
import com.yuqing.sentimentapp.workspace.epidemic.personal.entity.EpidemicPersonalReportResult;
import com.yuqing.sentimentapp.workspace.festival.action.entity.FestivalActionInfoResult;
import com.yuqing.sentimentapp.workspace.festival.action.entity.FestivalActionReportResult;
import com.yuqing.sentimentapp.workspace.festival.action.entity.FestivalUnitInfoResult;
import com.yuqing.sentimentapp.workspace.festival.activity.entity.FestivalActivityInfoResult;
import com.yuqing.sentimentapp.workspace.festival.activity.entity.FestivalActivityReportResult;
import com.yuqing.sentimentapp.workspace.heavyrainfallflood.entity.HeavyRainfallFloodInfoResult;
import com.yuqing.sentimentapp.workspace.heavyrainfallflood.entity.HeavyRainfallFloodReportResult;
import com.yuqing.sentimentapp.workspace.search.entity.CityResult;
import com.yuqing.sentimentapp.workspace.search.entity.RegionResult;
import com.yuqing.sentimentapp.workspace.search.entity.YqSearchResult;
import com.yuqing.sentimentapp.workspace.springfire.entity.SpringFireInfoResult;
import com.yuqing.sentimentapp.workspace.springfire.entity.SpringFireReportResult;
import com.yuqing.sentimentapp.workspace.statistics.entity.StatisticsInfoResult;
import com.yuqing.sentimentapp.workspace.statistics.entity.StatisticsReportResult;
import com.yuqing.sentimentapp.workspace.todayreport.entity.TodayReportInfoResult;
import com.yuqing.sentimentapp.workspace.todayreport.entity.TodayReportReportResult;
import com.yuqing.sentimentapp.workspace.typhoon.entity.TyphoonInfoResult;
import com.yuqing.sentimentapp.workspace.typhoon.entity.TyphoonReportResult;
import com.yuqing.sentimentapp.workspace.week.entity.WeekPlanInfoResult;
import com.yuqing.sentimentapp.workspace.week.entity.WeekPlanReportResult;
import com.yuqing.sentimentapp.yqlist.bean.YqDetailResultBean;
import com.yuqing.sentimentapp.yqlist.bean.YqListResultBean;
import com.yuqing.sentimentapp.yqlist.bean.YqReplyResultBean;
import com.yuqing.sentimentapp.yqlist.bean.YqReportResultBean;

import java.util.HashMap;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.Call;

/**
 * Created by shenhe on 2019/4/18.
 */
public class ModuleManager {
    private static ModuleManager moduleManager;

    private ModuleManager() {

    }

    public static ModuleManager getInstance() {
        if (moduleManager == null) {
            synchronized (ModuleManager.class) {
                if (moduleManager == null) {
                    moduleManager = new ModuleManager();
                    moduleManager.setHeader(new HashMap<>());
                }
            }
        }
        return moduleManager;
    }

    private Map<String, String> headerMap = new HashMap<>();

    public Map<String, String> getHeaderMap() {
        return headerMap;
    }

    public void setHeader(Map<String, String> headerMap) {
        this.headerMap.put("Authorization", SharePrefrenceHelper.getToken());
        this.headerMap.putAll(headerMap);
    }

    /**
     * 舆情列表接口
     * @param context 上下文
     * @param page 页码
     * @param pageSize 每页10条数据
     * @return
     */
    public Observable<YqListResultBean> loadYqListResult(Context context, String phone, int page, int pageSize) {
        return getApiService(context).getYqListResult(phone, page, pageSize);
    }

    /**
     * 搜索接口
     * @param context 上下文
     * @param page 页码
     * @param pageSize 每页10条数据
     * @param keyword 搜索关键词
     * @return
     */
    public Observable<YqListResultBean> loadYqSearchListResult(Context context, int page, int pageSize, String keyword) {
        return getApiService(context).getYqSearchListResult(page, pageSize, keyword);
    }

    /**
     * 舆情列表接口
     * @param context 上下文
     * @param articleId 舆情ID
     * @param deptCode 部门编号
     * @return
     */
    public Observable<YqDetailResultBean> loadYqDetailResult(Context context, String articleId, String deptCode) {
        return getApiService(context).getYqDetailResult(articleId, deptCode);
    }

    /**
     * 个人信息接口
     * @param context 上下文
     * @param mobile 手机号
     * @return
     */
    public Observable<MinePersonInfoBean> loadPersonCenterResult(Context context, String mobile) {
        return getApiService(context).getPersonCenterInfo(mobile);
    }

    /**
     * 预警接口
     * @param context 上下文
     * @return
     */
    public Observable<EarlyWarningDataBean> loadEarlyWarningResult(Context context, int page, int pageSize) {
        return getApiService(context).getEarlyWarnningResult(page, pageSize);
    }

    /**
     * 新闻接口
     * @param context 上下文
     * @return
     */
    public Observable<NewsDataBean> loadNewsDataResult(Context context, String phone, String category, int page, int pageSize) {
        return getApiService(context).getNewsDataResult(phone, category, page, pageSize);
    }

    /**
     * 上报接口 或 重报
     * @param context 上下文
     * @param params map参数集合
     * @return
     */
    public Observable<YqReportResultBean> postReportDataResult(Context context, Map<String, String> params, boolean isReportAgain) {
        if (isReportAgain) {
            return getApiService(context).postReportAgainDataResult(params);
        } else {
            return getApiService(context).postReportDataResult(params);
        }
    }

    /**
     * 更新栏目信息
     * @param context 上下文
     * @param cate 栏目categoryId顺序
     * @param status 栏目status顺序
     * @return
     */
    public Observable<BaseBean> uploadChannelResult(Context context, String cate, String status) {
        return getApiService(context).uploadChannelResult(cate, status);
    }

    /**
     * 推荐接口
     * @param context 上下文
     * @param page 页码
     * @param pageSize 10
     * @return
     */
    public Observable<RecommendDataBean> getRecommendDataResult(Context context, int page, int pageSize) {
        return getApiService(context).getRecommendDataResult(page, pageSize);
    }

    /**
     * 即时专题栏目
     * @param context 上下文
     * @param page 页码
     * @param pageSize 10
     * @return
     */
    public Observable<NewsDataBean> loadSpecialTopicDataResult(Context context, String phone, int page, int pageSize) {
        return getApiService(context).getSpecialTopicDataResult(phone, page, pageSize);
    }

    /**
     * 专题分析
     * @param context 上下文
     * @param page 页码
     * @param pageSize 10
     * @return
     */
    public Observable<NewsDataBean> loadTopicAnalysisDataResult(Context context, String phone, int page, int pageSize) {
        return getApiService(context).getTopicAnalysisDataResult(phone, page, pageSize);
    }

    /**
     * 新闻详情
     * @param context 上下文
     * @param loginMobile 手机号
     * @param webUrl 新闻Id
     * @return
     */
    public Observable<NewsDetailDataBean> getNewsDetailResult(Context context, String loginMobile, String webUrl) {
        return getApiService(context).getNewsDetailDataResult(loginMobile, webUrl);
    }

    /**
     * 回复
     * @param context 上下文
     * @param replyId 回复Id
     * @param remark 回复内容
     * @return
     */
    public Observable<YqReplyResultBean> replyRequest(Context context, String replyId, String remark) {
        return getApiService(context).replyRequest(replyId, remark);
    }

    /**
     * 预下发
     * @param context 上下文
     * @param articleId 舆情id
     * @return
     */
    public Observable<IssuedPrepareDataBean> loadIssuedPrepareRequest(Context context, String articleId, String subDeptCode) {
        return getApiService(context).loadIssuedPrepareRequest(articleId, subDeptCode);
    }

    /**
     * 保存下发地区
     * @param context 上下文
     * @param articleId 舆情id
     * @param province 省
     * @param city 市
     * @param county 县
     * @return
     */
    public Observable<IssuedSaveRegionDataBean> saveIssuedRegionRequest(Context context, String articleId, String province, String city, String county) {
        return getApiService(context).saveIssuedRegionRequest(articleId, province, city, county);
    }

    /**
     * 下发
     * @param context 上下文
     * @param articleId 舆情id
     * @param subDept 下级部门编号
     * @return
     */
    public Observable<BaseBean> postIssuedRequest(Context context, String articleId, String subDept) {
        return getApiService(context).postIssuedRequest(articleId, subDept);
    }

    /**
     * 退出登录
     * @param context 上下文
     * @return
     */
    public Observable<BaseBean> postLogoutRequest(Context context) {
        return getApiService(context).postLogoutRequest();
    }

    /**
     * 舆情隐藏
     * @param context 上下文
     * @return
     */
    public Observable<BaseBean> postHideRequest(Context context, String articleId) {
        return getApiService(context).postHideRequest(articleId);
    }

    /**
     * 专题详情列表
     * @param context 上下文
     * @param topicId 专题id
     * @return
     */
    public Observable<SpecialTopicDetailDataBean> getSpecialTopicDetailResult(Context context, String topicId) {
        return getApiService(context).getSpecialTopicDetailRequest(topicId);
    }

    /**
     * 消息通知
     * @param context 上下文
     * @return
     */
    public Observable<BaseBean> postNoticeResult(Context context, int wxNotice, int appNotice, int buildId) {
        return getApiService(context).postNoticeRequest(wxNotice, appNotice, buildId);
    }

    /**
     * 热门栏目
     * @param context 上下文
     * @return
     */
    public Observable<HotChannelBean> loadHotChannelResult(Context context) {
        return getApiService(context).getHotChannelRequest();
    }

    public ApiService getApiService(Context context) {
        return RetrofitClient.getInstance(context, null, headerMap).create(ApiService.class);
    }

    /**
     * 获取验证码
     * @param context 上下文
     * @param phone 手机号
     * @param imei 手机IMEI值
     * @param time 时间戳
     * @return
     */
    public Observable<BaseBean> getVerifyCodeRequest(Context context, String phone, String imei, long time) {
        String token = new Md5Util().getMD5ofStr(imei + "yuqing" + time + "119");
        return getApiService(context).postVerifyCodeRequest(phone, imei, time, token);
    }

    /**
     * 回复接口
     * @param context 上下文
     * @param replyId 回复ID
     * @return
     */
    public Observable<ReplyDataBean> getReplyRequest(Context context, String replyId) {
        return getApiService(context).getReplyDataRequest(replyId);
    }

    public Observable<LoginResultBean> getWXLoginRequest(Context context, String code) {
        return getApiService(context).postAuthLogin(code);
    }


    //节日警情报送 获取节日信息、部门信息、年份等信息
    public Observable<FestivalUnitInfoResult> getFestivalListData() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getFestivalListData();
    }





    //疫情防控  获取信息报送状态
    public Observable<EpidemicPersonalReportResult> requestEpidemicPersonalTodayInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getEpidemicPersonalTodayInfo();
    }

    //疫情防控  获取上报内容
    public Observable<EpidemicPersonalInfoResult> requestEpidemicPersonalReportInfoResult(String id) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getEpidemicPersonalReportInfo(id);
    }

    //疫情防控  获取上报单位
    public Observable<ReportUnitInfoResult> requestEpidemicReportUnitInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getEpidemicPersonalReportUnitInfo();
    }

    //疫情防控  保存上报内容
    public Observable<BaseBean> saveEpidemicPersonalReportInfoResult(EpidemicPersonalInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("data[coldCommanderCount]", actionInfo.getColdCommanderCount());
        data.put("data[coldFiremanCount]", actionInfo.getColdFiremanCount());
        data.put("data[coldClerkCount]", actionInfo.getColdClerkCount());
        data.put("data[coldOtherCount]", actionInfo.getColdOtherCount());
        data.put("data[coldFamilyCount]", actionInfo.getColdFamilyCount());
        data.put("data[feverCommanderCount]", actionInfo.getFeverCommanderCount());
        data.put("data[feverFiremanCount]", actionInfo.getFeverFiremanCount());
        data.put("data[feverClerkCount]", actionInfo.getFeverClerkCount());
        data.put("data[feverOtherCount]", actionInfo.getFeverOtherCount());
        data.put("data[feverFamilyCount]", actionInfo.getFeverFamilyCount());
        data.put("data[suspectCommanderCount]", actionInfo.getSuspectCommanderCount());
        data.put("data[suspectFiremanCount]", actionInfo.getSuspectFiremanCount());
        data.put("data[suspectClerkCount]", actionInfo.getSuspectClerkCount());
        data.put("data[suspectOtherCount]", actionInfo.getSuspectOtherCount());
        data.put("data[suspectFamilyCount]", actionInfo.getSuspectFamilyCount());
        data.put("data[confirmCommanderCount]", actionInfo.getConfirmCommanderCount());
        data.put("data[confirmFiremanCount]", actionInfo.getConfirmFiremanCount());
        data.put("data[confirmClerkCount]", actionInfo.getConfirmClerkCount());
        data.put("data[confirmOtherCount]", actionInfo.getConfirmOtherCount());
        data.put("data[confirmFamilyCount]", actionInfo.getConfirmFamilyCount());
        data.put("data[otherStayCount]", actionInfo.getOtherStayCount());
        data.put("data[otherTouchCount]", actionInfo.getOtherTouchCount());
        data.put("data[otherSuspectCount]", actionInfo.getOtherSuspectCount());
        data.put("data[otherSeclusionCount]", actionInfo.getOtherSeclusionCount());
        data.put("data[placePersonCount]", actionInfo.getPlacePersonCount());
        data.put("data[placeCount]", actionInfo.getPlaceCount());
        data.put("data[remark]", actionInfo.getRemark());
        data.put("data[reportor]", actionInfo.getReportor());
        data.put("data[auditor]", actionInfo.getAuditor());
        data.put("data[phone]", actionInfo.getPhone());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).saveEpidemicPersonalReportInfo(data);
    }

    //疫情防控  更新上报内容
    public Observable<BaseBean> updateEpidemicPersonalReportInfoResult(EpidemicPersonalInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("data[id]", actionInfo.getId());
        data.put("data[coldCommanderCount]", actionInfo.getColdCommanderCount());
        data.put("data[coldFiremanCount]", actionInfo.getColdFiremanCount());
        data.put("data[coldClerkCount]", actionInfo.getColdClerkCount());
        data.put("data[coldOtherCount]", actionInfo.getColdOtherCount());
        data.put("data[coldFamilyCount]", actionInfo.getColdFamilyCount());
        data.put("data[feverCommanderCount]", actionInfo.getFeverCommanderCount());
        data.put("data[feverFiremanCount]", actionInfo.getFeverFiremanCount());
        data.put("data[feverClerkCount]", actionInfo.getFeverClerkCount());
        data.put("data[feverOtherCount]", actionInfo.getFeverOtherCount());
        data.put("data[feverFamilyCount]", actionInfo.getFeverFamilyCount());
        data.put("data[suspectCommanderCount]", actionInfo.getSuspectCommanderCount());
        data.put("data[suspectFiremanCount]", actionInfo.getSuspectFiremanCount());
        data.put("data[suspectClerkCount]", actionInfo.getSuspectClerkCount());
        data.put("data[suspectOtherCount]", actionInfo.getSuspectOtherCount());
        data.put("data[suspectFamilyCount]", actionInfo.getSuspectFamilyCount());
        data.put("data[confirmCommanderCount]", actionInfo.getConfirmCommanderCount());
        data.put("data[confirmFiremanCount]", actionInfo.getConfirmFiremanCount());
        data.put("data[confirmClerkCount]", actionInfo.getConfirmClerkCount());
        data.put("data[confirmOtherCount]", actionInfo.getConfirmOtherCount());
        data.put("data[confirmFamilyCount]", actionInfo.getConfirmFamilyCount());
        data.put("data[otherStayCount]", actionInfo.getOtherStayCount());
        data.put("data[otherTouchCount]", actionInfo.getOtherTouchCount());
        data.put("data[otherSuspectCount]", actionInfo.getOtherSuspectCount());
        data.put("data[otherSeclusionCount]", actionInfo.getOtherSeclusionCount());
        data.put("data[placePersonCount]", actionInfo.getPlacePersonCount());
        data.put("data[placeCount]", actionInfo.getPlaceCount());
        data.put("data[remark]", actionInfo.getRemark());
        data.put("data[reportor]", actionInfo.getReportor());
        data.put("data[auditor]", actionInfo.getAuditor());
        data.put("data[phone]", actionInfo.getPhone());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).updateEpidemicPersonalReportInfo(data);
    }

    //疫情防控  导出历史上报信息
    public Call<ResponseBody> exportEpidemicPersonalHistoryReportInfoResult(String level, String from, String to) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportEpidemicPersonalHistotyReportInfo(level, from, to);
    }

    //疫情防控  导出今日上报信息
    public Call<ResponseBody> exportEpidemicPersonalTodayReportInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportEpidemicPersonalTodayReportInfo();
    }





    //对外参与  获取信息报送状态
    public Observable<EpidemicActionReportResult> requestEpidemicActionTodayInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getEpidemicActionTodayInfo();
    }

    //对外参与  获取上报内容
    public Observable<EpidemicActionInfoResult> requestEpidemicActionReportInfoResult(String id) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getEpidemicActionReportInfo(id);
    }

    //对外参与  获取上报单位
    public Observable<ReportUnitInfoResult> requestEpidemicActionReportUnitInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getEpidemicActionReportUnitInfo();
    }

    //对外参与  保存上报内容
    public Observable<BaseBean> saveEpidemicActionReportInfoResult(EpidemicActionInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("data[fireActionCount]", actionInfo.getFireActionCount());
        data.put("data[fireActionPersonCount]", actionInfo.getFireActionPersonCount());
        data.put("data[fireActionCarCount]", actionInfo.getFireActionCarCount());
        data.put("data[ctlActionCount]", actionInfo.getCtlActionCount());
        data.put("data[ctlActionPersonCount]", actionInfo.getCtlActionPersonCount());
        data.put("data[ctlActionCarCount]", actionInfo.getCtlActionCarCount());
        data.put("data[assistActionCount]", actionInfo.getAssistActionCount());
        data.put("data[assistActionPersonCount]", actionInfo.getAssistActionPersonCount());
        data.put("data[assistActionCarCount]", actionInfo.getAssistActionCarCount());
        data.put("data[otherActionCount]", actionInfo.getOtherActionCount());
        data.put("data[otherActionPersonCount]", actionInfo.getOtherActionPersonCount());
        data.put("data[otherActionCarCount]", actionInfo.getOtherActionCarCount());
        data.put("data[reportor]", actionInfo.getReportor());
        data.put("data[auditor]", actionInfo.getAuditor());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).saveEpidemicActionReportInfo(data);
    }

    //对外参与  更新上报内容
    public Observable<BaseBean> updateEpidemicActionReportInfoResult(EpidemicActionInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("data[id]", actionInfo.getId());
        data.put("data[fireActionCount]", actionInfo.getFireActionCount());
        data.put("data[fireActionPersonCount]", actionInfo.getFireActionPersonCount());
        data.put("data[fireActionCarCount]", actionInfo.getFireActionCarCount());
        data.put("data[ctlActionCount]", actionInfo.getCtlActionCount());
        data.put("data[ctlActionPersonCount]", actionInfo.getCtlActionPersonCount());
        data.put("data[ctlActionCarCount]", actionInfo.getCtlActionCarCount());
        data.put("data[assistActionCount]", actionInfo.getAssistActionCount());
        data.put("data[assistActionPersonCount]", actionInfo.getAssistActionPersonCount());
        data.put("data[assistActionCarCount]", actionInfo.getAssistActionCarCount());
        data.put("data[otherActionCount]", actionInfo.getOtherActionCount());
        data.put("data[otherActionPersonCount]", actionInfo.getOtherActionPersonCount());
        data.put("data[otherActionCarCount]", actionInfo.getOtherActionCarCount());
        data.put("data[reportor]", actionInfo.getReportor());
        data.put("data[auditor]", actionInfo.getAuditor());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).updateEpidemicActionReportInfo(data);
    }

    //对外参与  导出历史上报信息
    public Call<ResponseBody> exportEpidemicActionHistoryReportInfoResult(String level, String from, String to) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportEpidemicActionHistotyReportInfo(level, from, to);
    }

    //对外参与  导出今日上报信息
    public Call<ResponseBody> exportEpidemicActionTodayReportInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportEpidemicActionTodayReportInfo();
    }





    //防疫物资  获取信息报送状态
    public Observable<EpidemicMaterialReportResult> requestEpidemicMaterialTodayInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getEpidemicMaterialTodayInfo();
    }

    //防疫物资  获取上报内容
    public Observable<EpidemicMaterialInfoResult> requestEpidemicMaterialReportInfoResult(String id) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getEpidemicMaterialReportInfo(id);
    }

    //防疫物资  获取上报单位
    public Observable<ReportUnitInfoResult> requestEpidemicMaterialReportUnitInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getEpidemicMaterialReportUnitInfo();
    }

    //防疫物资  保存上报内容
    public Observable<BaseBean> saveEpidemicMaterialReportInfoResult(EpidemicMaterialInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("data[proClothCount]", actionInfo.getProClothCount());
        data.put("data[maskCount]", actionInfo.getMaskCount());
        data.put("data[gogglesCount]", actionInfo.getGogglesCount());
        data.put("data[gloveCount]", actionInfo.getGloveCount());
        data.put("data[disinfectantCount]", actionInfo.getDisinfectantCount());
        data.put("data[alcoholCount]", actionInfo.getAlcoholCount());
        data.put("data[reportor]", actionInfo.getReportor());
        data.put("data[auditor]", actionInfo.getAuditor());
        data.put("data[remark]", actionInfo.getRemark());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).saveEpidemicMaterialReportInfo(data);
    }

    //防疫物资  更新上报内容
    public Observable<BaseBean> updateEpidemicMaterialReportInfoResult(EpidemicMaterialInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("data[id]", actionInfo.getId());
        data.put("data[proClothCount]", actionInfo.getProClothCount());
        data.put("data[maskCount]", actionInfo.getMaskCount());
        data.put("data[gogglesCount]", actionInfo.getGogglesCount());
        data.put("data[gloveCount]", actionInfo.getGloveCount());
        data.put("data[disinfectantCount]", actionInfo.getDisinfectantCount());
        data.put("data[alcoholCount]", actionInfo.getAlcoholCount());
        data.put("data[reportor]", actionInfo.getReportor());
        data.put("data[auditor]", actionInfo.getAuditor());
        data.put("data[remark]", actionInfo.getRemark());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).updateEpidemicMaterialReportInfo(data);
    }

    //防疫物资  导出历史上报信息
    public Call<ResponseBody> exportEpidemicMaterialHistoryReportInfoResult(String level, String from, String to) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportEpidemicMaterialHistotyReportInfo(level, from, to);
    }

    //防疫物资  导出今日上报信息
    public Call<ResponseBody> exportEpidemicMaterialTodayReportInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportEpidemicMaterialTodayReportInfo();
    }





    //节日活动  获取信息报送状态
    public Observable<FestivalActivityReportResult> requestFestivalActivityTodayInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getFestivalActivityTodayInfo();
    }

    //节日活动  获取上报内容
    public Observable<FestivalActivityInfoResult> requestFestivalActivityReportInfoResult(String id) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getFestivalActivityReportInfo(id);
    }

    //节日活动  获取上报单位
    public Observable<ReportUnitInfoResult> requestFestivalActivityReportUnitInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getFestivalActivityReportUnitInfo();
    }

    //节日活动  保存上报内容
    public Observable<BaseBean> saveFestivalActivityReportInfoResult(FestivalActivityInfoResult.DataBean actionInfo, String festival) {
        Map<String, String> data = new HashMap<>();
        data.put("festivalActivityReport[festival]", festival);
        data.put("festivalActivityReport[p1]", actionInfo.getP1());
        data.put("festivalActivityReport[p2]", actionInfo.getP2());
        data.put("festivalActivityReport[p3]", actionInfo.getP3());
        data.put("festivalActivityReport[p4]", actionInfo.getP4());
        data.put("festivalActivityReport[p5]", actionInfo.getP5());
        data.put("festivalActivityReport[p6]", actionInfo.getP6());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).saveFestivalActivityReportInfo(data);
    }

    //节日活动  更新上报内容
    public Observable<BaseBean> updateFestivalActivityReportInfoResult(FestivalActivityInfoResult.DataBean actionInfo, String festival) {
        Map<String, String> data = new HashMap<>();
        data.put("festivalActivityReport[id]", actionInfo.getId());
        data.put("festivalActivityReport[festival]", festival);
        data.put("festivalActivityReport[p1]", actionInfo.getP1());
        data.put("festivalActivityReport[p2]", actionInfo.getP2());
        data.put("festivalActivityReport[p3]", actionInfo.getP3());
        data.put("festivalActivityReport[p4]", actionInfo.getP4());
        data.put("festivalActivityReport[p5]", actionInfo.getP5());
        data.put("festivalActivityReport[p6]", actionInfo.getP6());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).updateFestivalActivityReportInfo(data);
    }

    //节日活动  导出历史上报信息
    public Call<ResponseBody> exportFestivalActivityHistoryReportInfoResult(String level, String from, String to, String festival, String year) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportFestivalActivityHistotyReportInfo(level, from, to, festival, year);
    }

    //节日活动  导出今日上报信息
    public Call<ResponseBody> exportFestivalActivityTodayReportInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportFestivalActivityTodayReportInfo();
    }





    //强降雨洪涝灾害  获取信息报送状态
    public Observable<HeavyRainfallFloodReportResult> requestHeavyRainfallFloodTodayInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getHeavyRainfallFloodTodayInfo();
    }

    //强降雨洪涝灾害  获取上报内容
    public Observable<HeavyRainfallFloodInfoResult> requestHeavyRainfallFloodReportInfoResult(String id) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getHeavyRainfallFloodReportInfo(id);
    }

    //强降雨洪涝灾害  获取上报单位
    public Observable<ReportUnitInfoResult> requestHeavyRainfallFloodReportUnitInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getHeavyRainfallFloodReportUnitInfo();
    }

    //强降雨洪涝灾害  保存上报内容
    public Observable<BaseBean> saveHeavyRainfallFloodReportInfoResult(HeavyRainfallFloodInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("heavyRainfallFloodSta[actionC1]", actionInfo.getActionC1());
        data.put("heavyRainfallFloodSta[actionC2]", actionInfo.getActionC2());
        data.put("heavyRainfallFloodSta[actionC3]", actionInfo.getActionC3());
        data.put("heavyRainfallFloodSta[actionC4]", actionInfo.getActionC4());
        data.put("heavyRainfallFloodSta[actionC5]", actionInfo.getActionC5());
        data.put("heavyRainfallFloodSta[actionC6]", actionInfo.getActionC6());
        data.put("heavyRainfallFloodSta[staPersonCount]", actionInfo.getStaPersonCount());
        data.put("heavyRainfallFloodSta[staCarCount]", actionInfo.getStaCarCount());
        data.put("heavyRainfallFloodSta[staBoatCount]", actionInfo.getStaBoatCount());
        data.put("heavyRainfallFloodSta[staSafeCount]", actionInfo.getStaSafeCount());
        data.put("heavyRainfallFloodSta[staEvacuateCount]", actionInfo.getStaEvacuateCount());
        data.put("heavyRainfallFloodSta[staRescueProperty]", actionInfo.getStaRescueProperty());
        data.put("heavyRainfallFloodSta[staSafeProperty]", actionInfo.getStaSafeProperty());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).saveHeavyRainfallFloodReportInfo(data);
    }

    //强降雨洪涝灾害  更新上报内容
    public Observable<BaseBean> updateHeavyRainfallFloodReportInfoResult(HeavyRainfallFloodInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("heavyRainfallFloodSta[id]", actionInfo.getId());
        data.put("heavyRainfallFloodSta[actionC1]", actionInfo.getActionC1());
        data.put("heavyRainfallFloodSta[actionC2]", actionInfo.getActionC2());
        data.put("heavyRainfallFloodSta[actionC3]", actionInfo.getActionC3());
        data.put("heavyRainfallFloodSta[actionC4]", actionInfo.getActionC4());
        data.put("heavyRainfallFloodSta[actionC5]", actionInfo.getActionC5());
        data.put("heavyRainfallFloodSta[actionC6]", actionInfo.getActionC6());
        data.put("heavyRainfallFloodSta[staPersonCount]", actionInfo.getStaPersonCount());
        data.put("heavyRainfallFloodSta[staCarCount]", actionInfo.getStaCarCount());
        data.put("heavyRainfallFloodSta[staBoatCount]", actionInfo.getStaBoatCount());
        data.put("heavyRainfallFloodSta[staSafeCount]", actionInfo.getStaSafeCount());
        data.put("heavyRainfallFloodSta[staEvacuateCount]", actionInfo.getStaEvacuateCount());
        data.put("heavyRainfallFloodSta[staRescueProperty]", actionInfo.getStaRescueProperty());
        data.put("heavyRainfallFloodSta[staSafeProperty]", actionInfo.getStaSafeProperty());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).updateHeavyRainfallFloodReportInfo(data);
    }

    //强降雨洪涝灾害  导出历史上报信息
    public Call<ResponseBody> exportHeavyRainfallFloodHistoryReportInfoResult(String level, String from, String to) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportHeavyRainfallFloodHistotyReportInfo(level, from, to);
    }

    //强降雨洪涝灾害  导出今日上报信息
    public Call<ResponseBody> exportHeavyRainfallFloodTodayReportInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportHeavyRainfallFloodTodayReportInfo();
    }





    //台风抢险  获取信息报送状态
    public Observable<TyphoonReportResult> requestTyphoonTodayInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getTyphoonTodayInfo();
    }

    //台风抢险  获取上报内容
    public Observable<TyphoonInfoResult> requestTyphoonReportInfoResult(String id) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getTyphoonReportInfo(id);
    }

    //台风抢险  获取上报单位
    public Observable<ReportUnitInfoResult> requestTyphoonReportUnitInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getTyphoonReportUnitInfo();
    }

    //台风抢险  保存上报内容
    public Observable<BaseBean> saveTyphoonReportInfoResult(TyphoonInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("typhoonSta[clearBillboardCount]", actionInfo.getClearBillboardCount());
        data.put("typhoonSta[trafficAccidentCount]", actionInfo.getTrafficAccidentCount());
        data.put("typhoonSta[clearCollapseCount]", actionInfo.getClearCollapseCount());
        data.put("typhoonSta[homeTrappedCount]", actionInfo.getHomeTrappedCount());
        data.put("typhoonSta[buildCollapseCount]", actionInfo.getBuildCollapseCount());
        data.put("typhoonSta[drainageCount]", actionInfo.getDrainageCount());
        data.put("typhoonSta[mountainFloodCount]", actionInfo.getMountainFloodCount());
        data.put("typhoonSta[debrisFlowCount]", actionInfo.getDebrisFlowCount());
        data.put("typhoonSta[landslideCount]", actionInfo.getLandslideCount());
        data.put("typhoonSta[commanderCount]", actionInfo.getCommanderCount());
        data.put("typhoonSta[carCount]", actionInfo.getCarCount());
        data.put("typhoonSta[boatCount]", actionInfo.getBoatCount());
        data.put("typhoonSta[rescuePeopleCount]", actionInfo.getRescuePeopleCount());
        data.put("typhoonSta[evacuatePeopleCount]", actionInfo.getEvacuatePeopleCount());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).saveTyphoonReportInfo(data);
    }

    //台风抢险  更新上报内容
    public Observable<BaseBean> updateTyphoonReportInfoResult(TyphoonInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("typhoonSta[id]", actionInfo.getId());
        data.put("typhoonSta[clearBillboardCount]", actionInfo.getClearBillboardCount());
        data.put("typhoonSta[trafficAccidentCount]", actionInfo.getTrafficAccidentCount());
        data.put("typhoonSta[clearCollapseCount]", actionInfo.getClearCollapseCount());
        data.put("typhoonSta[homeTrappedCount]", actionInfo.getHomeTrappedCount());
        data.put("typhoonSta[buildCollapseCount]", actionInfo.getBuildCollapseCount());
        data.put("typhoonSta[drainageCount]", actionInfo.getDrainageCount());
        data.put("typhoonSta[mountainFloodCount]", actionInfo.getMountainFloodCount());
        data.put("typhoonSta[debrisFlowCount]", actionInfo.getDebrisFlowCount());
        data.put("typhoonSta[landslideCount]", actionInfo.getLandslideCount());
        data.put("typhoonSta[commanderCount]", actionInfo.getCommanderCount());
        data.put("typhoonSta[carCount]", actionInfo.getCarCount());
        data.put("typhoonSta[boatCount]", actionInfo.getBoatCount());
        data.put("typhoonSta[rescuePeopleCount]", actionInfo.getRescuePeopleCount());
        data.put("typhoonSta[evacuatePeopleCount]", actionInfo.getEvacuatePeopleCount());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).updateTyphoonReportInfo(data);
    }

    //台风抢险  导出历史上报信息
    public Call<ResponseBody> exportTyphoonHistoryReportInfoResult(String level, String from, String to) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportTyphoonHistotyReportInfo(level, from, to);
    }

    //台风抢险  导出今日上报信息
    public Call<ResponseBody> exportTyphoonTodayReportInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportTyphoonTodayReportInfo();
    }





    //每日消防  获取信息报送状态
    public Observable<TodayReportReportResult> requestTodayReportTodayInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getTodayReportTodayInfo();
    }

    //每日消防  获取上报内容
    public Observable<TodayReportInfoResult> requestTodayReportReportInfoResult(String id) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getTodayReportReportInfo(id);
    }

    //每日消防  获取上报单位
    public Observable<ReportUnitInfoResult> requestTodayReportReportUnitInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getTodayReportReportUnitInfo();
    }

    //每日消防  保存上报内容
    public Observable<BaseBean> saveTodayReportReportInfoResult(TodayReportInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("report[content]", actionInfo.getContent());
        data.put("report[workstatus]", actionInfo.getWorkstatus());
        data.put("report[festival]", actionInfo.getFestival());
        data.put("report[creator]", actionInfo.getCreator());
        data.put("report[auditor]", actionInfo.getAuditor());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).saveTodayReportReportInfo(data);
    }

    //每日消防  更新上报内容
    public Observable<BaseBean> updateTodayReportReportInfoResult(TodayReportInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("report[id]", actionInfo.getId());
        data.put("report[content]", actionInfo.getContent());
        data.put("report[workstatus]", actionInfo.getWorkstatus());
        data.put("report[festival]", actionInfo.getFestival());
        data.put("report[creator]", actionInfo.getCreator());
        data.put("report[auditor]", actionInfo.getAuditor());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).updateTodayReportReportInfo(data);
    }

    //每日消防  导出历史上报信息
    public Call<ResponseBody> exportTodayReportHistoryReportInfoResult(String level, String from) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportTodayReportHistotyReportInfo(level, from);
    }

    //每日消防  导出今日上报信息
    public Call<ResponseBody> exportTodayReportTodayReportInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportTodayReportTodayReportInfo();
    }





    //周工作情况  获取信息报送状态
    public Observable<WeekPlanReportResult> requestWeekPlanTodayInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getWeekPlanTodayInfo();
    }

    //周工作情况  获取上报内容
    public Observable<WeekPlanInfoResult> requestWeekPlanReportInfoResult(String id) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getWeekPlanReportInfo(id);
    }

    //周工作情况  获取上报单位
    public Observable<ReportUnitInfoResult> requestWeekPlanReportUnitInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getWeekPlanReportUnitInfo();
    }

    //周工作情况  保存上报内容
    public Observable<BaseBean> saveWeekPlanReportInfoResult(WeekPlanInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("weekPlan[thisPlan]", actionInfo.getThisPlan());
        data.put("weekPlan[nextPlan]", actionInfo.getNextPlan());
        data.put("weekPlan[creator]", actionInfo.getCreator());
        data.put("weekPlan[auditor]", actionInfo.getAuditor());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).saveWeekPlanReportInfo(data);
    }

    //周工作情况  更新上报内容
    public Observable<BaseBean> updateWeekPlanReportInfoResult(WeekPlanInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("weekPlan[id]", actionInfo.getId());
        data.put("weekPlan[thisPlan]", actionInfo.getThisPlan());
        data.put("weekPlan[nextPlan]", actionInfo.getNextPlan());
        data.put("weekPlan[creator]", actionInfo.getCreator());
        data.put("weekPlan[auditor]", actionInfo.getAuditor());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).updateWeekPlanReportInfo(data);
    }

    //周工作情况  导出历史上报信息
    public Call<ResponseBody> exportWeekPlanHistoryReportInfoResult(String level, String from) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportWeekPlanHistotyReportInfo(level, from);
    }

    //周工作情况  导出今日上报信息
    public Call<ResponseBody> exportWeekPlanTodayReportInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportWeekPlanTodayReportInfo();
    }





    //杨絮火灾  获取信息报送状态
    public Observable<SpringFireReportResult> requestSpringFireTodayInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getSpringFireTodayInfo();
    }

    //杨絮火灾  获取上报内容
    public Observable<SpringFireInfoResult> requestSpringFireReportInfoResult(String id) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getSpringFireReportInfo(id);
    }

    //杨絮火灾  获取上报单位
    public Observable<ReportUnitInfoResult> requestSpringFireReportUnitInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getSpringFireReportUnitInfo();
    }

    //杨絮火灾  保存上报内容
    public Observable<BaseBean> saveSpringFireReportInfoResult(SpringFireInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("data[fireCount]", actionInfo.getFireCount());
        data.put("data[actionCount]", actionInfo.getActionCount());
        data.put("data[carCount]", actionInfo.getCarCount());
        data.put("data[firemanCount]", actionInfo.getFiremanCount());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).saveSpringFireReportInfo(data);
    }

    //杨絮火灾  更新上报内容
    public Observable<BaseBean> updateSpringFireReportInfoResult(SpringFireInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("data[id]", actionInfo.getId());
        data.put("data[fireCount]", actionInfo.getFireCount());
        data.put("data[actionCount]", actionInfo.getActionCount());
        data.put("data[carCount]", actionInfo.getCarCount());
        data.put("data[firemanCount]", actionInfo.getFiremanCount());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).updateSpringFireReportInfo(data);
    }

    //杨絮火灾  导出历史上报信息
    public Call<ResponseBody> exportSpringFireHistoryReportInfoResult(String level, String from, String to) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportSpringFireHistotyReportInfo(level, from, to);
    }

    //杨絮火灾  导出今日上报信息
    public Call<ResponseBody> exportSpringFireTodayReportInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportSpringFireTodayReportInfo();
    }





    //每日报送信息统计  获取信息报送状态
    public Observable<StatisticsReportResult> requestStatisticsTodayInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getStatisticsTodayInfo();
    }

    //每日报送信息统计  获取上报内容
    public Observable<StatisticsInfoResult> requestStatisticsReportInfoResult(String id) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getStatisticsReportInfo(id);
    }

    //每日报送信息统计  获取上报单位
    public Observable<ReportUnitInfoResult> requestStatisticsReportUnitInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getStatisticsReportUnitInfo();
    }

    //每日报送信息统计  保存上报内容
    public Observable<BaseBean> saveStatisticsReportInfoResult(StatisticsInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("data[fireAlarmCount]", actionInfo.getFireAlarmCount());
        data.put("data[fireFireCount]", actionInfo.getFireFireCount());
        data.put("data[fireOutCount]", actionInfo.getFireOutCount());
        data.put("data[fireCarCount]", actionInfo.getFireCarCount());
        data.put("data[fireFiremanCount]", actionInfo.getFireFiremanCount());
        data.put("data[fireDeathCount]", actionInfo.getFireDeathCount());
        data.put("data[fireInjuredCount]", actionInfo.getFireInjuredCount());
        data.put("data[fireRescueCount]", actionInfo.getFireRescueCount());
        data.put("data[fireEvacuationCount]", actionInfo.getFireEvacuationCount());
        data.put("data[fireUseCount]", actionInfo.getFireUseCount());
        data.put("data[rescueAlarmCount]", actionInfo.getRescueAlarmCount());
        data.put("data[rescueOutCount]", actionInfo.getRescueOutCount());
        data.put("data[rescueCarCount]", actionInfo.getRescueCarCount());
        data.put("data[rescueFiremanCount]", actionInfo.getRescueFiremanCount());
        data.put("data[rescueDeathCount]", actionInfo.getRescueDeathCount());
        data.put("data[rescueInjuredCount]", actionInfo.getRescueInjuredCount());
        data.put("data[rescueRescueCount]", actionInfo.getRescueRescueCount());
        data.put("data[rescueEvacuationCount]", actionInfo.getRescueEvacuationCount());
        data.put("data[rescueUseCount]", actionInfo.getRescueUseCount());
        data.put("data[explosionAlarmCount]", actionInfo.getExplosionAlarmCount());
        data.put("data[explosionCarCount]", actionInfo.getExplosionCarCount());
        data.put("data[explosionFiremanCount]", actionInfo.getExplosionFiremanCount());
        data.put("data[explosionDeathCount]", actionInfo.getExplosionDeathCount());
        data.put("data[explosionInjuredCount]", actionInfo.getExplosionInjuredCount());
        data.put("data[explosionRescueCount]", actionInfo.getExplosionRescueCount());
        data.put("data[explosionEvacuationCount]", actionInfo.getExplosionEvacuationCount());
        data.put("data[explosionUseCount]", actionInfo.getExplosionUseCount());
        data.put("data[trafficAlarmCount]", actionInfo.getTrafficAlarmCount());
        data.put("data[trafficCarCount]", actionInfo.getTrafficCarCount());
        data.put("data[trafficFiremanCount]", actionInfo.getTrafficFiremanCount());
        data.put("data[trafficDeathCount]", actionInfo.getTrafficDeathCount());
        data.put("data[trafficInjuredCount]", actionInfo.getTrafficInjuredCount());
        data.put("data[trafficRescueCount]", actionInfo.getTrafficRescueCount());
        data.put("data[trafficUseCount]", actionInfo.getTrafficUseCount());
        data.put("data[collapseAlarmCount]", actionInfo.getCollapseAlarmCount());
        data.put("data[collapseCarCount]", actionInfo.getCollapseCarCount());
        data.put("data[collapseFiremanCount]", actionInfo.getCollapseFiremanCount());
        data.put("data[collapseDeathCount]", actionInfo.getCollapseDeathCount());
        data.put("data[collapseInjuredCount]", actionInfo.getCollapseInjuredCount());
        data.put("data[collapseRescueCount]", actionInfo.getCollapseRescueCount());
        data.put("data[collapseEvacuationCount]", actionInfo.getCollapseEvacuationCount());
        data.put("data[collapseUseCount]", actionInfo.getCollapseUseCount());
        data.put("data[reportInstructionCount]", actionInfo.getReportInstructionCount());
        data.put("data[reportImportantCount]", actionInfo.getReportImportantCount());
        data.put("data[reportNewsCount]", actionInfo.getReportNewsCount());
        data.put("data[useInstructionCount]", actionInfo.getUseInstructionCount());
        data.put("data[useImportantCount]", actionInfo.getUseImportantCount());
        data.put("data[useNewsCount]", actionInfo.getUseNewsCount());
        data.put("data[phone]", actionInfo.getPhone());
        data.put("data[problem]", actionInfo.getProblem());
        data.put("data[dutyLeader]", actionInfo.getDutyLeader());
        data.put("data[remark]", actionInfo.getRemark());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).saveStatisticsReportInfo(data);
    }

    //每日报送信息统计  更新上报内容
    public Observable<BaseBean> updateStatisticsReportInfoResult(StatisticsInfoResult.DataBean actionInfo) {
        Map<String, String> data = new HashMap<>();
        data.put("data[id]", actionInfo.getId());
        data.put("data[fireAlarmCount]", actionInfo.getFireAlarmCount());
        data.put("data[fireFireCount]", actionInfo.getFireFireCount());
        data.put("data[fireOutCount]", actionInfo.getFireOutCount());
        data.put("data[fireCarCount]", actionInfo.getFireCarCount());
        data.put("data[fireFiremanCount]", actionInfo.getFireFiremanCount());
        data.put("data[fireDeathCount]", actionInfo.getFireDeathCount());
        data.put("data[fireInjuredCount]", actionInfo.getFireInjuredCount());
        data.put("data[fireRescueCount]", actionInfo.getFireRescueCount());
        data.put("data[fireEvacuationCount]", actionInfo.getFireEvacuationCount());
        data.put("data[fireUseCount]", actionInfo.getFireUseCount());
        data.put("data[rescueAlarmCount]", actionInfo.getRescueAlarmCount());
        data.put("data[rescueOutCount]", actionInfo.getRescueOutCount());
        data.put("data[rescueCarCount]", actionInfo.getRescueCarCount());
        data.put("data[rescueFiremanCount]", actionInfo.getRescueFiremanCount());
        data.put("data[rescueDeathCount]", actionInfo.getRescueDeathCount());
        data.put("data[rescueInjuredCount]", actionInfo.getRescueInjuredCount());
        data.put("data[rescueRescueCount]", actionInfo.getRescueRescueCount());
        data.put("data[rescueEvacuationCount]", actionInfo.getRescueEvacuationCount());
        data.put("data[rescueUseCount]", actionInfo.getRescueUseCount());
        data.put("data[explosionAlarmCount]", actionInfo.getExplosionAlarmCount());
        data.put("data[explosionCarCount]", actionInfo.getExplosionCarCount());
        data.put("data[explosionFiremanCount]", actionInfo.getExplosionFiremanCount());
        data.put("data[explosionDeathCount]", actionInfo.getExplosionDeathCount());
        data.put("data[explosionInjuredCount]", actionInfo.getExplosionInjuredCount());
        data.put("data[explosionRescueCount]", actionInfo.getExplosionRescueCount());
        data.put("data[explosionEvacuationCount]", actionInfo.getExplosionEvacuationCount());
        data.put("data[explosionUseCount]", actionInfo.getExplosionUseCount());
        data.put("data[trafficAlarmCount]", actionInfo.getTrafficAlarmCount());
        data.put("data[trafficCarCount]", actionInfo.getTrafficCarCount());
        data.put("data[trafficFiremanCount]", actionInfo.getTrafficFiremanCount());
        data.put("data[trafficDeathCount]", actionInfo.getTrafficDeathCount());
        data.put("data[trafficInjuredCount]", actionInfo.getTrafficInjuredCount());
        data.put("data[trafficRescueCount]", actionInfo.getTrafficRescueCount());
        data.put("data[trafficUseCount]", actionInfo.getTrafficUseCount());
        data.put("data[collapseAlarmCount]", actionInfo.getCollapseAlarmCount());
        data.put("data[collapseCarCount]", actionInfo.getCollapseCarCount());
        data.put("data[collapseFiremanCount]", actionInfo.getCollapseFiremanCount());
        data.put("data[collapseDeathCount]", actionInfo.getCollapseDeathCount());
        data.put("data[collapseInjuredCount]", actionInfo.getCollapseInjuredCount());
        data.put("data[collapseRescueCount]", actionInfo.getCollapseRescueCount());
        data.put("data[collapseEvacuationCount]", actionInfo.getCollapseEvacuationCount());
        data.put("data[collapseUseCount]", actionInfo.getCollapseUseCount());
        data.put("data[reportInstructionCount]", actionInfo.getReportInstructionCount());
        data.put("data[reportImportantCount]", actionInfo.getReportImportantCount());
        data.put("data[reportNewsCount]", actionInfo.getReportNewsCount());
        data.put("data[useInstructionCount]", actionInfo.getUseInstructionCount());
        data.put("data[useImportantCount]", actionInfo.getUseImportantCount());
        data.put("data[useNewsCount]", actionInfo.getUseNewsCount());
        data.put("data[phone]", actionInfo.getPhone());
        data.put("data[problem]", actionInfo.getProblem());
        data.put("data[dutyLeader]", actionInfo.getDutyLeader());
        data.put("data[remark]", actionInfo.getRemark());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).updateStatisticsReportInfo(data);
    }

    //每日报送信息统计  导出历史上报信息
    public Call<ResponseBody> exportStatisticsHistoryReportInfoResult(String level, String from, String to) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportStatisticsHistotyReportInfo(level, from, to);
    }

    //每日报送信息统计  导出今日上报信息
    public Call<ResponseBody> exportStatisticsTodayReportInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportStatisticsTodayReportInfo();
    }







    //节日警情报送  获取信息报送状态
    public Observable<FestivalActionReportResult> requestFestivalActionReportInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getFestivalActionReportInfo();
    }

    //节日警情报送  获取上报内容
    public Observable<FestivalActionInfoResult> requestFestivalActionInfoResult(String id) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getFestivalActionInfo(id);
    }

    //节日警情报送  获取上报单位
    public Observable<ReportUnitInfoResult> requestFestivalActionReportUnitInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getFestivalActionReportUnitInfo();
    }

    //节日警情报送  保存上报内容
    public Observable<BaseBean> saveFestivalActionReportInfoResult(FestivalActionInfoResult.DataBean actionInfo) {
        Map<String, String> festivalActionInfoMap = new HashMap<>();
        festivalActionInfoMap.put("festivalActionReport[festival]", actionInfo.getFestival());
        festivalActionInfoMap.put("festivalActionReport[fireCount]", actionInfo.getFireCount());
        festivalActionInfoMap.put("festivalActionReport[fireDeadCount]", actionInfo.getFireDeadCount());
        festivalActionInfoMap.put("festivalActionReport[fireInjuredCount]", actionInfo.getFireInjuredCount());
        festivalActionInfoMap.put("festivalActionReport[fireLossCount]", actionInfo.getFireLossCount());
        festivalActionInfoMap.put("festivalActionReport[tmpPointCount]", actionInfo.getTmpPointCount());
        festivalActionInfoMap.put("festivalActionReport[tmpCarCount]", actionInfo.getTmpCarCount());
        festivalActionInfoMap.put("festivalActionReport[tmpPeopleCount]", actionInfo.getTmpPeopleCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoTeamCount]", actionInfo.getFsfoTeamCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoCheckCount]", actionInfo.getFsfoCheckCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoDiscoveryCount]", actionInfo.getFsfoDiscoveryCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoRectifyCount]", actionInfo.getFsfoRectifyCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoCloseCount]", actionInfo.getFsfoCloseCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoBanCount]", actionInfo.getFsfoBanCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoPropagateCount]", actionInfo.getFsfoPropagateCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoBroadcastCount]", actionInfo.getFsfoBroadcastCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoMessageCount]", actionInfo.getFsfoMessageCount());
        festivalActionInfoMap.put("festivalActionReport[actionOutfireCount]", actionInfo.getActionOutfireCount());
        festivalActionInfoMap.put("festivalActionReport[actionErCount]", actionInfo.getActionErCount());
        festivalActionInfoMap.put("festivalActionReport[carOutfireCount]", actionInfo.getCarOutfireCount());
        festivalActionInfoMap.put("festivalActionReport[carErCount]", actionInfo.getCarErCount());
        festivalActionInfoMap.put("festivalActionReport[peopleOutfireCount]", actionInfo.getPeopleOutfireCount());
        festivalActionInfoMap.put("festivalActionReport[peopleErCount]", actionInfo.getPeopleErCount());
        festivalActionInfoMap.put("festivalActionReport[saveOutfireCount]", actionInfo.getSaveOutfireCount());
        festivalActionInfoMap.put("festivalActionReport[saveErCount]", actionInfo.getSaveErCount());
        festivalActionInfoMap.put("festivalActionReport[evacuateOutfireCount]", actionInfo.getEvacuateOutfireCount());
        festivalActionInfoMap.put("festivalActionReport[evacuateErCount]", actionInfo.getEvacuateErCount());
        festivalActionInfoMap.put("festivalActionReport[propertyOutfireCount]", actionInfo.getPropertyOutfireCount());
        festivalActionInfoMap.put("festivalActionReport[propertyErCount]", actionInfo.getPropertyErCount());
        festivalActionInfoMap.put("festivalActionReport[patrolCarCount]", actionInfo.getPatrolCarCount());
        festivalActionInfoMap.put("festivalActionReport[patrolPeopleCount]", actionInfo.getPatrolPeopleCount());
        festivalActionInfoMap.put("festivalActionReport[drillCount]", actionInfo.getDrillCount());
        festivalActionInfoMap.put("festivalActionReport[dutyPointCount]", actionInfo.getDutyPointCount());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).saveFestivalActionReportInfo(festivalActionInfoMap);
    }

    //节日警情报送  更新上报内容
    public Observable<BaseBean> updateFestivalActionReportInfoResult(FestivalActionInfoResult.DataBean actionInfo) {
        Map<String, String> festivalActionInfoMap = new HashMap<>();
        festivalActionInfoMap.put("festivalActionReport[id]", actionInfo.getId());
        festivalActionInfoMap.put("festivalActionReport[festival]", actionInfo.getFestival());
        festivalActionInfoMap.put("festivalActionReport[fireCount]", actionInfo.getFireCount());
        festivalActionInfoMap.put("festivalActionReport[fireDeadCount]", actionInfo.getFireDeadCount());
        festivalActionInfoMap.put("festivalActionReport[fireInjuredCount]", actionInfo.getFireInjuredCount());
        festivalActionInfoMap.put("festivalActionReport[fireLossCount]", actionInfo.getFireLossCount());
        festivalActionInfoMap.put("festivalActionReport[tmpPointCount]", actionInfo.getTmpPointCount());
        festivalActionInfoMap.put("festivalActionReport[tmpCarCount]", actionInfo.getTmpCarCount());
        festivalActionInfoMap.put("festivalActionReport[tmpPeopleCount]", actionInfo.getTmpPeopleCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoTeamCount]", actionInfo.getFsfoTeamCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoCheckCount]", actionInfo.getFsfoCheckCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoDiscoveryCount]", actionInfo.getFsfoDiscoveryCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoRectifyCount]", actionInfo.getFsfoRectifyCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoCloseCount]", actionInfo.getFsfoCloseCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoBanCount]", actionInfo.getFsfoBanCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoPropagateCount]", actionInfo.getFsfoPropagateCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoBroadcastCount]", actionInfo.getFsfoBroadcastCount());
        festivalActionInfoMap.put("festivalActionReport[fsfoMessageCount]", actionInfo.getFsfoMessageCount());
        festivalActionInfoMap.put("festivalActionReport[actionOutfireCount]", actionInfo.getActionOutfireCount());
        festivalActionInfoMap.put("festivalActionReport[actionErCount]", actionInfo.getActionErCount());
        festivalActionInfoMap.put("festivalActionReport[carOutfireCount]", actionInfo.getCarOutfireCount());
        festivalActionInfoMap.put("festivalActionReport[carErCount]", actionInfo.getCarErCount());
        festivalActionInfoMap.put("festivalActionReport[peopleOutfireCount]", actionInfo.getPeopleOutfireCount());
        festivalActionInfoMap.put("festivalActionReport[peopleErCount]", actionInfo.getPeopleErCount());
        festivalActionInfoMap.put("festivalActionReport[saveOutfireCount]", actionInfo.getSaveOutfireCount());
        festivalActionInfoMap.put("festivalActionReport[saveErCount]", actionInfo.getSaveErCount());
        festivalActionInfoMap.put("festivalActionReport[evacuateOutfireCount]", actionInfo.getEvacuateOutfireCount());
        festivalActionInfoMap.put("festivalActionReport[evacuateErCount]", actionInfo.getEvacuateErCount());
        festivalActionInfoMap.put("festivalActionReport[propertyOutfireCount]", actionInfo.getPropertyOutfireCount());
        festivalActionInfoMap.put("festivalActionReport[propertyErCount]", actionInfo.getPropertyErCount());
        festivalActionInfoMap.put("festivalActionReport[patrolCarCount]", actionInfo.getPatrolCarCount());
        festivalActionInfoMap.put("festivalActionReport[patrolPeopleCount]", actionInfo.getPatrolPeopleCount());
        festivalActionInfoMap.put("festivalActionReport[drillCount]", actionInfo.getDrillCount());
        festivalActionInfoMap.put("festivalActionReport[dutyPointCount]", actionInfo.getDutyPointCount());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).updateFestivalActionReportInfo(festivalActionInfoMap);
    }

    //节日警情报送  导出历史上报信息
    public Call<ResponseBody> exportFestivalActionHistoryReportInfoResult(String level, String from, String to, String festival, String year) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportFestivalActionHistotyReportInfo(level, from, to, festival, year);
    }

    //节日警情报送  导出今日上报信息
    public Call<ResponseBody> exprotFestivalActionTodayReportInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportFestivalActionTodayReportInfo();
    }








    //今日警情报送  获取信息报送状态
    public Observable<ActionReportResult> requestActionReportInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getActionReportInfo();
    }

    //今日警情报送  获取上报内容
    public Observable<ActionInfoResult> requestActionInfoResult(String id) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getActionInfo(id);
    }

    //今日警情报送  获取上报单位
    public Observable<ReportUnitInfoResult> requestActionReportUnitInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getActionReportUnitInfo();
    }

    //今日警情报送  保存上报内容
    public Observable<BaseBean> saveActionReportInfoResult(ActionInfoResult.DataBean actionInfo) {
        Map<String, String> actionInfoMap = new HashMap<>();
        actionInfoMap.put("data[fireCount]", actionInfo.getFireCount());
        actionInfoMap.put("data[fireActionCount]", actionInfo.getFireActionCount());
        actionInfoMap.put("data[fireCarCount]", actionInfo.getFireCarCount());
        actionInfoMap.put("data[firePeopleCount]", actionInfo.getFirePeopleCount());
        actionInfoMap.put("data[fireDeadCount]", actionInfo.getFireDeadCount());
        actionInfoMap.put("data[fireInjuredCount]", actionInfo.getFireInjuredCount());
        actionInfoMap.put("data[fireSavedCount]", actionInfo.getFireSavedCount());
        actionInfoMap.put("data[fireSurviveCount]", actionInfo.getFireSurviveCount());
        actionInfoMap.put("data[fireEvacuateCount]", actionInfo.getFireEvacuateCount());
        actionInfoMap.put("data[rescueCount]", actionInfo.getRescueCount());
        actionInfoMap.put("data[rescueActionCount]", actionInfo.getRescueActionCount());
        actionInfoMap.put("data[rescueCarCount]", actionInfo.getRescueCarCount());
        actionInfoMap.put("data[rescuePeopleCount]", actionInfo.getRescuePeopleCount());
        actionInfoMap.put("data[rescueDeadCount]", actionInfo.getRescueDeadCount());
        actionInfoMap.put("data[rescueInjuredCount]", actionInfo.getRescueInjuredCount());
        actionInfoMap.put("data[rescueSavedCount]", actionInfo.getRescueSavedCount());
        actionInfoMap.put("data[rescueSurviveCount]", actionInfo.getRescueSurviveCount());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).saveActionReportInfo(actionInfoMap);
    }

    //今日警情报送  更新上报内容
    public Observable<BaseBean> updateActionReportInfoResult(ActionInfoResult.DataBean actionInfo) {
        Map<String, String> actionInfoMap = new HashMap<>();
        actionInfoMap.put("data[id]", actionInfo.getId());
        actionInfoMap.put("data[fireCount]", actionInfo.getFireCount());
        actionInfoMap.put("data[fireActionCount]", actionInfo.getFireActionCount());
        actionInfoMap.put("data[fireCarCount]", actionInfo.getFireCarCount());
        actionInfoMap.put("data[firePeopleCount]", actionInfo.getFirePeopleCount());
        actionInfoMap.put("data[fireDeadCount]", actionInfo.getFireDeadCount());
        actionInfoMap.put("data[fireInjuredCount]", actionInfo.getFireInjuredCount());
        actionInfoMap.put("data[fireSavedCount]", actionInfo.getFireSavedCount());
        actionInfoMap.put("data[fireSurviveCount]", actionInfo.getFireSurviveCount());
        actionInfoMap.put("data[fireEvacuateCount]", actionInfo.getFireEvacuateCount());
        actionInfoMap.put("data[rescueCount]", actionInfo.getRescueCount());
        actionInfoMap.put("data[rescueActionCount]", actionInfo.getRescueActionCount());
        actionInfoMap.put("data[rescueCarCount]", actionInfo.getRescueCarCount());
        actionInfoMap.put("data[rescuePeopleCount]", actionInfo.getRescuePeopleCount());
        actionInfoMap.put("data[rescueDeadCount]", actionInfo.getRescueDeadCount());
        actionInfoMap.put("data[rescueInjuredCount]", actionInfo.getRescueInjuredCount());
        actionInfoMap.put("data[rescueSavedCount]", actionInfo.getRescueSavedCount());
        actionInfoMap.put("data[rescueSurviveCount]", actionInfo.getRescueSurviveCount());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).updateActionReportInfo(actionInfoMap);
    }

    //今日警情报送  导出历史上报信息
    public Call<ResponseBody> exprotActionHistoryReportInfoResult(String level, String from, String to) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportActionHistotyReportInfo(level, from, to);
    }

    //今日警情报送  导出今日上报信息
    public Call<ResponseBody> exprotActionTodayReportInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportActionTodayReportInfo();
    }






    //值班报表  获取信息报送状态
    public Observable<DutyReportResult> requestDutyReportInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getDutyReportInfo();
    }

    //值班报表  获取上报内容
    public Observable<DutyInfoResult> requestDutyInfoResult(String id) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getDutyInfo(id);
    }

    //值班报表  获取上报单位
    public Observable<ReportUnitInfoResult> requestDutyReportUnitInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).getDutyReportUnitInfo();
    }

    //值班报表  保存上报内容
    public Observable<BaseBean> saveDutyReportInfoResult(DutyInfoResult.DataBean dutyInfo) {
        Map<String, String> dutyInfoMap = new HashMap<>();
        dutyInfoMap.put("duty[leader]", dutyInfo.getLeader());
        dutyInfoMap.put("duty[monitor]", dutyInfo.getMonitor());
        dutyInfoMap.put("duty[duty1]", dutyInfo.getDuty1());
        dutyInfoMap.put("duty[duty2]", dutyInfo.getDuty2());
        dutyInfoMap.put("duty[yqduty]", dutyInfo.getYqduty());
        dutyInfoMap.put("duty[phone]", dutyInfo.getPhone());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).saveDutyReportInfo(dutyInfoMap);
    }

    //值班报表  更新上报内容
    public Observable<BaseBean> updateDutyReportInfoResult(DutyInfoResult.DataBean dutyInfo) {
        Map<String, String> dutyInfoMap = new HashMap<>();
        dutyInfoMap.put("duty[infoid]", dutyInfo.getInfoid());
        dutyInfoMap.put("duty[leader]", dutyInfo.getLeader());
        dutyInfoMap.put("duty[monitor]", dutyInfo.getMonitor());
        dutyInfoMap.put("duty[duty1]", dutyInfo.getDuty1());
        dutyInfoMap.put("duty[duty2]", dutyInfo.getDuty2());
        dutyInfoMap.put("duty[yqduty]", dutyInfo.getYqduty());
        dutyInfoMap.put("duty[phone]", dutyInfo.getPhone());
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).updateDutyReportInfo(dutyInfoMap);
    }

    //值班报表  导出历史上报信息
    public Call<ResponseBody> exprotDutyHistoryReportInfoResult(String level, String from, String to) {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportDutyHistotyReportInfo(level, from, to);
    }

    //值班报表  导出今日上报信息
    public Call<ResponseBody> exprotDutyTodayReportInfoResult() {
        return RetrofitClient.getInstance(QYApplication.getAppContext(), null, ModuleManager.getInstance().getHeaderMap()).create(ApiService.class).exportDutyTodayReportInfo();
    }



    /**
     * 舆情搜索接口
     * @param page 页码
     * @param pageSize 每页10条数据
     * @return
     */
    public Observable<YqSearchResult> loadYqListResult(String keyword, String from, String to, String source, String region, String city, int page, int pageSize) {
        return getApiService(QYApplication.getAppContext()).getYqSearchResult(keyword, from, to, source, region, city, page, pageSize);
    }

    /**
     * 获取一级地域
     * @return
     */
    public Observable<RegionResult> getSearchPreResult() {
        return getApiService(QYApplication.getAppContext()).getSearchPreResult();
    }

    /**
     * 获取二级地域
     * @return
     */
    public Observable<CityResult> getSearchSubRegionResult(String regionCode) {
        return getApiService(QYApplication.getAppContext()).getSearchSubRegionResult(regionCode);
    }
}
